Jakarta Messaging
   HOME

TheInfoList



OR:

The Jakarta Messaging API (formerly Java Message Service or JMS API) is a
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how t ...
(API) for
message-oriented middleware Message-oriented middleware (MOM) is software or hardware infrastructure supporting sending and receiving messages between distributed systems. MOM allows application modules to be distributed over heterogeneous platforms and reduces the complex ...
. It provides generic messaging models, able to handle the producer–consumer problem, that can be used to facilitate the sending and receiving of messages between
software system A software system is a system of intercommunicating components based on software forming part of a computer system (a combination of hardware and software). It "consists of a number of separate programs, configuration files, which are used to se ...
s. Jakarta Messaging is a part of
Jakarta EE Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web serv ...
and was originally defined by a specification developed at Sun Microsystems before being guided by the
Java Community Process The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. Anyone can become a JCP Member by filling a form available at thJCP w ...
.


General idea of messaging

Messaging is a form of '' loosely coupled'' distributed communication, where in this context the term 'communication' can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax ''tightly coupled'' communication (such as TCP network sockets,
CORBA The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sys ...
or RMI) by the introduction of an intermediary component. This approach allows software components to communicate with each other indirectly. Benefits of this include message senders not needing to have precise knowledge of their receivers. The advantages of messaging include the ability to integrate heterogeneous platforms, reduce system bottlenecks, increase scalability, and respond more quickly to change.


Version history

* JMS 1.0 * JMS 1.0.1 (October 5, 1998) * JMS 1.0.1a (October 30, 1998) * JMS 1.0.2 (December 17, 1999) * JMS 1.0.2a (December 23, 1999) * JMS 1.0.2b (August 27, 2001) * JMS 1.1 (April 12, 2002) * JMS 2.0 (May 21, 2013) * JMS 2.0a (March 16, 2015) JMS 2.0 is currently maintained under the
Java Community Process The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. Anyone can become a JCP Member by filling a form available at thJCP w ...
as JSR 343. JMS 3.0 is under early development as part of Jakarta EE.


Elements

The following are JMS elements:Java Message Service (JMS)
/ref> ; JMS provider : An implementation of the JMS interface for message-oriented middleware (MOM). Providers are implemented as either a Java JMS implementation or an adapter to a non-Java MOM. ; JMS client : An application or process that produces and/or receives messages. ; JMS producer/publisher : A JMS client that creates and sends messages. ; JMS consumer/subscriber : A JMS client that receives messages. ; JMS message : An object that contains the data being transferred between JMS clients. ; JMS queue : A staging area that contains messages that have been sent and are waiting to be read (by only one consumer). As the name queue suggests, the messages are delivered in the order sent. A JMS queue guarantees that each message is processed only once. ; JMS topic : A distribution mechanism for publishing messages that are delivered to multiple subscribers.


Models

The JMS API supports two distinct models: * Point-to-point * Publish-and-subscribe


Point-to-point model

Under the ''point-to-point'' messaging system, messages are routed to individual consumers who maintain queues of incoming messages. This messaging type is built on the concept of
message queue In computer science, message queues and mailboxes are software-engineering components typically used for inter-process communication (IPC), or for inter- thread communication within the same process. They use a queue for messaging – the ...
s, senders, and receivers. Each message is addressed to a specific queue, and the receiving clients extract messages from the queues established to hold their messages. While any number of producers can send messages to the queue, each message is guaranteed to be delivered, and consumed by one consumer. Queues retain all messages sent to them until the messages are consumed or until the messages expire. If no consumers are registered to consume the messages, the queue holds them until a consumer registers to consume them.


Publish-and-subscribe model

The '' publish-and-subscribe'' model supports publishing messages to a particular message "topic". ''Subscribers'' may register interest in receiving messages ''published'' on a particular message topic. In this model, neither the publisher nor the subscriber knows about each other. A good analogy for this is an anonymous bulletin board. * Zero or more consumers will receive the message. * There is a timing dependency between publishers and subscribers. The publisher has to create a message topic for clients to subscribe. The subscriber has to remain continuously active to receive messages, unless it has established a durable subscription. In that case, messages published while the subscriber is not connected will be redistributed whenever it reconnects. JMS provides a way of separating the application from the
transport layer In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end ...
of providing data. The same Java classes can be used to communicate with different JMS providers by using the
Java Naming and Directory Interface The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and resources (in the form of Java objects) via a name. Like all Java APIs that interface with host ...
(JNDI) information for the desired provider. The classes first use a ''connection factory'' to connect to the queue or topic, and then use populate and send or publish the messages. On the receiving side, the clients then receive or subscribe to the messages.


URI scheme

RFC 6167 defines a jms:
URI scheme A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. URIs may be used to identify anything, including real-world objects, such as people and places, conc ...
for the Java Message Service.


Provider implementations

To use JMS, one must have a JMS provider that can manage the sessions, queues and topics. Starting from Java EE version 1.4, a JMS provider has to be contained in ''all'' Java EE application servers. This can be implemented using the message inflow management of the
Java EE Connector Architecture Jakarta Connectors (JCA; formerly Java EE Connector Architecture and J2EE Connector Architecture) is a Java programming language tool for connecting application servers and enterprise information systems (EIS) as part of enterprise application i ...
, which was first made available in that version. The following is a list of common JMS providers: *
Amazon SQS Amazon most often refers to: * Amazons, a tribe of female warriors in Greek mythology * Amazon rainforest, a rainforest covering most of the Amazon basin * Amazon River, in South America * Amazon (company), an American multinational technolog ...
'
Java Messaging Library
*
Apache ActiveMQ Apache ActiveMQ is an open source message broker written in Java together with a full Java Message Service (JMS) client. It provides "Enterprise Features" which in this case means fostering the communication from more than one client or server. Su ...
*
Apache Qpid Apache Qpid is an open-source messaging system which implements the Advanced Message Queuing Protocol (AMQP). It provides transaction management, queuing, distribution, security, management, clustering, federation and heterogeneous multi-platfor ...
, using
AMQP The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-su ...
*
IBM MQ IBM MQ is a family of message-oriented middleware products that IBM launched in December 1993. It was originally called MQSeries, and was renamed ''WebSphere MQ'' in 2002 to join the suite of IBM WebSphere, WebSphere products. In April 2014, it was ...
(formerly MQSeries, then WebSphere MQ) *
IBM WebSphere Application Server WebSphere Application Server (WAS) is a software product that performs the role of a web application server. More specifically, it is a software framework and middleware that hosts Java-based web applications. It is the flagship product with ...
's Service Integration Bus (SIBus) *
JBoss Messaging JBoss Messaging is the JBoss enterprise asynchronous messaging system. It supersedes JBoss MQ as the default Java Message Service (JMS) provider in JBoss Application Server (JBoss AS) 5. JBoss Messaging 1.0 was released on 29 March 2006 as a r ...
and
HornetQ HornetQ is an open-source asynchronous messaging Message-oriented middleware (MOM) is software or hardware infrastructure supporting sending and receiving messages between distributed systems. MOM allows application modules to be distributed o ...
from
JBoss WildFly, formerly known as JBoss AS, or simply JBoss, is an application server written by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on mul ...
* JORAM from the
OW2 Consortium OW2 is an independent non-profit international consortium dedicated to developing open-source software code infrastructure for middleware information systems. OW2 federates IT vendors and users, universities, and research centers from Europe, ...
*
Open Message Queue Open Message Queue (OpenMQ or Open MQ) is an open-source message-oriented middleware project by Oracle (formerly Sun Microsystems) that implements the Java Message Service 2.0 API (JMS). It is the default JMS provider integrated into GlassFish. ...
from
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word '' ...
* OpenJMS from the OpenJMS Group *
Oracle WebLogic Server Oracle WebLogic Server is a Java EE application server currently developed by Oracle Corporation. Oracle acquired WebLogic Server when it purchased BEA Systems in 2008. Application Server versions * WebLogic Server 14c (14.1.1) - March 30, 20 ...
and Oracle AQ * PubSub+ from
Solace Consolation, consolement, and solace are terms referring to psychological comfort given to someone who has suffered severe, upsetting loss, such as the death of a loved one. It is typically provided by expressing shared regret for that loss and ...
*
RabbitMQ RabbitMQ is an open-source message-broker software (sometimes called message-oriented middleware) that originally implemented the Advanced Message Queuing Protocol (AMQP) and has since been extended with a plug-in architecture to support Str ...
from
Pivotal Software Pivotal Software, Inc. was an American multinational software and services company based in San Francisco that provided cloud platform hosting and consulting services. Since December 2019, Pivotal has been part of VMware. History Pivotal S ...
* TIBCO Cloud Messaging from TIBCO Software * TIBCO Enterprise Message Service from TIBCO Software


See also

*
Message Driven Bean Jakarta Enterprise Beans (EJB; formerly Enterprise JavaBeans) is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web co ...
s *
Message queue In computer science, message queues and mailboxes are software-engineering components typically used for inter-process communication (IPC), or for inter- thread communication within the same process. They use a queue for messaging – the ...
— the concept underlying JMS *
Service-oriented architecture In software engineering, service-oriented architecture (SOA) is an architectural style that focuses on discrete services instead of a monolithic design. By consequence, it is also applied in the field of software design where services are provide ...
**
Event-driven SOA Event-driven SOA is a form of service-oriented architecture (SOA), combining the intelligence and proactiveness of event-driven architecture with the organizational capabilities found in service offerings. Before event-driven SOA, the typical SOA ...
* Messaging technologies that do ''not'' implement the JMS API include: **
Advanced Message Queuing Protocol The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-su ...
(AMQP) — standardized message queue protocol with multiple independent implementations **
Data Distribution Service The Data Distribution Service (DDS) for real-time systems is an Object Management Group (OMG) machine-to-machine (sometimes called middleware or connectivity framework) standard that aims to enable dependable, high-performance, interoperable, re ...
(DDS) — An Object Management Group (OMG) standardized real-time messaging system with over ten implementations that have demonstrated interoperability between publishers and subscribers **
Microsoft Message Queuing Microsoft Message Queuing (MSMQ) is a message queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. Windows Server 2016 and Windows 10 also includes this component. In a ...
— similar technology, implemented for
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...


References


Further reading

*


External links

*
JSR 343: Java Message Service 2.0
* API
Javadoc Javadoc (originally cased JavaDoc) is a documentation generator created by Sun Microsystems for the Java language (now owned by Oracle Corporation) for generating API documentation in HTML format from Java source code. The HTML format is used for ...
documentation
Oracle's Java EE 7 JMS tutorial

A historical comparison matrix of JMS providers
{{DEFAULTSORT:Message Service Java enterprise platform Java specification requests Message-oriented middleware Software architecture